CFLAGS+=-pthread -fpic
LDFLAGS+=-pthread
SO_LDFLAGS+=$(LDFLAGS) -shared

DISTDIR=../../../dist/lib/

all: modtest libmytbf.so

libmytbf.so: mytbf.o
	$(CC) $(CFLAGS) $(SO_LDFLAGS) -o $@ $^

modtest: modtest.o mytbf.o

clean:
	rm *.o *.so modtest

install: all
	install -d $(DISTDIR)
	install -c *.so $(DISTDIR)

